<template>
  <div class="contain" style="display:flex">
    <singleButton class="index_btn" :containList="routerList1"></singleButton>
    <singleButton class="index_btn" :containList="routerList2"></singleButton>
  </div>
</template>
<script>
import singleButton from "./components/singleButton.vue";
import getrouter from "./router";
export default {
  data() {
    return {
      containList: [
        {
          title: "继续",
          url: "prepare",
        },
        {
          title: "新的启程",
          url: "prepare",
        },
        {
          title: "回忆",
          url: "prepare",
        },
      ],
      routerList1: [],
      routerList2: [],
    };
  },
  components: {
    singleButton,
  },
  methods: {
    getList() {
     var  gameRouter = localStorage.getItem("gameRouter")
     var  demoRouter = localStorage.getItem("demoRouter")
      this.routerList1 =JSON.parse(demoRouter) 
      this.routerList2 =JSON.parse(gameRouter) 
    },
    jump(url, data) {
      if (url && url == "-1") {
        this.$router.back(-1);
      } else {
        this.$router.push({ path: url, query: data });
      }
    },
  },
  mounted() {
    this.getList();
  },
};
</script>
<style>
.item-card {
  margin: 40px 40px 0 40px;
}
.index_btn{
  width: 200px;
}
.contain{
  border: 2px solid #000;
  height: 400px;
  overflow: scroll;
}
</style>